<template>
  <div id="BoxEst">
    <!--   导航栏   -->
    <div class="top">
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-col :span="1"><p></p></el-col>
        <el-col :span="3">
          <router-link to="/">
            <el-image
              style="width: 175px;height: 64px"
              src= static/test.png
              fit="fill"
              :lazy="true">
            </el-image>
          </router-link>
        </el-col>
        <el-menu-item index="/loginAfterIndex" >首页</el-menu-item>
        <el-submenu index="2">
          <template slot="title">关于大赛</template>
          <el-menu-item index="2-1">竞赛信息</el-menu-item>
          <el-menu-item index="2-2">竞赛通知</el-menu-item>
          <el-menu-item index="2-3">竞赛报名</el-menu-item>
          <el-menu-item index="2-4">获奖信息</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">学习资料</template>
          <el-menu-item index="3-1">上传资料</el-menu-item>
          <el-menu-item index="3-2">下载资料</el-menu-item>

        </el-submenu>
        <el-submenu index="4">
          <template slot="title">团队合作</template>
          <el-menu-item index="/myTeam">我的团队</el-menu-item>
          <el-menu-item index="4-2">学习小组</el-menu-item>
          <el-menu-item index="4-3">竞赛团队</el-menu-item>
        </el-submenu>
        <el-menu-item index="5">论坛</el-menu-item>
        <el-col :span="9"><p></p></el-col>
        <el-submenu index="6">
          <template slot="title">
            <i class="el-icon-user"></i>
            {{userName}}</template>
          <el-menu-item index="">个人中心</el-menu-item>
          <el-menu-item index="/forget">找回密码</el-menu-item>
          <el-menu-item index="/">退出登录</el-menu-item>
        </el-submenu>
      </el-menu>
    </div>
    <!--   主要内容   -->
    <div class="main">
      <el-carousel height="450px">
        <el-carousel-item v-for="item in 4" :key="item">
          <h3 class="small">{{ item }}</h3>
        </el-carousel-item>

      </el-carousel>

    </div>
    <!--   底部    -->
    <div class="footer">



    </div>
  </div>
</template>

<script>




  export default {
    name: "indexAfterIndex",
    components: {

    },

    data(){
      return {
        activeIndex: this.$route.path,
        userName: window.localStorage.getItem('userName'),
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
        this.$router.push(key);

      },


    }
  }
</script>

<style scoped>
  #BoxEst{

  }
  .el-header, .el-footer {

    text-align: center;
    line-height: 20px;
  }
  .el-main {

    text-align: center;
    line-height: 180px;
  }


  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>
